{include file="header.htm" /}
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit; min-width: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page ad" style="min-width: auto;">
    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>站内文档列表</h3>
                <h5>(共{$pageObj->totalRows}条记录)</h5>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <form class="navbar-form form-inline" action="{:weapp_url('Wechat/Keyword/news_select_archives')}" method="get" onsubmit="layer_loading('正在处理');">
                {$searchform.hidden|default=''}
                <div class="sDiv">
                    <div class="sDiv2">  
                        <select name="typeid" class="select" style="margin:0px 5px;">
                            <option value="">--全部栏目--</option>
                            {$select_html}
                        </select>
                    </div>
                    <div class="sDiv2">
                        <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
                        <input type="submit" class="btn" value="搜索">
                    </div>
                    <div class="sDiv2">
                        <input type="button" class="btn" value="重置" onClick="window.location.href='{:weapp_url('Wechat/Keyword/news_select_archives')}';">
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                    <tr>
                        <th class="sign w80" axis="col0">
                            <div class="tc">ID</div>
                        </th>
                        <th abbr="article_title" axis="col3" class="">
                            <div class="">标题</div>
                        </th>
                        <th abbr="article_time" axis="col6" class="w100">
                            <div class="tc">所属栏目</div>
                        </th>
                        <th abbr="article_time" axis="col6" class="w60">
                            <div class="tc">封面图</div>
                        </th>
                        <th axis="col1" class="w120">
                            <div class="tc">操作</div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%;">
                    <tbody>
                    {empty name="list"}
                        <tr>
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
                            </td>
                        </tr>
                    {else/}
                        {foreach name="list" item="vo" key="k" }
                        <tr>
                            <td class="sign">
                                <div class="w80 tc">{$vo.aid}</div>
                            </td>
                            <td style="width: 100%;">
                                <div class="">{$vo.title}</div>
                            </td>
                            <td class="">
                                <div class="w100 tc">{$vo.typename|default='<i class="red">数据出错！</i>'}</div>
                            </td>
                            <td class="">
                                <div class="w60 tc">
                                    {empty name="$vo.litpic"}
                                        无
                                    {else/}
                                        <a class="btn green" class="btn" href="javascript:preview('{$vo.litpic}');"><i class="fa fa-youtube-play"></i>预览</a>
                                    {/empty}
                                </div>
                            </td>
                            <td>
                                <div class="w120 tc">
                                    <input type="hidden" id="arcurl_{$vo.aid}" value="{$vo.arcurl}" />
                                    <input type="hidden" id="litpic_{$vo.aid}" value="{$vo.litpic}" />
                                    <textarea id="title_{$vo.aid}" class="none">{$vo.title}</textarea>
                                    <textarea id="seo_description_{$vo.aid}" class="none">{$vo.seo_description|html_msubstr=###,0,110,true}</textarea> 
                                    <a class="btn blue" href="javascript:void(0);" onClick="parent.selected(this, {$vo.aid});"><i class="fa fa-location-arrow"></i>选择</a>
                                </div>
                            </td>
                        </tr>
                        {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        <div class="tDiv">
            <div class="tDiv2">
            </div>
            <div style="clear:both"></div>
        </div>
        <!--分页位置-->
        {$pageStr}
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){

        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });

    function preview(url){
        layer.open({
            type: 1,
            title: false,
            closeBtn: true,
            area: ['300px','auto'],
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: false,
            content: "<img src='"+url+"' width='300' height='300'>"
        });
    }
</script>

{include file="footer.htm" /}